<template>
	<view class="order_management">
		<u-sticky>
			<view class="tab_nav">
				<nav-bar
					nav_btn="back"
					:index="index"
					@onPicker="getPicker"
					:title="title"
					:showPicker="showPicker"
					:color="color"
					:placeholder="placeholder"
					:list="list"
					:auto_img="image"
					:background="background"
				></nav-bar>
			</view>
			<view class="header_share w750 flex">
				<view class="search-warp">
					<input class="uni_ipt" type="text" v-model="keyword" value="" placeholder-style="color: #CCCCCC;" placeholder-class="s24 f500 family" placeholder="输入下单人/手机号" />
					<image class="search_img" src="../static/search.png"></image>
					<view @click="search" class="search_btn s26 f500 family txtali">搜索</view>
				</view>
				<view class="filter" @click="expandAndCollapse">
					<image class="rqsxicon" src="/static/rqsx.svg"></image>
					<text class="title">筛选</text>
					<image :class="['arrow', { showv: showv }]" src="/static/down.svg"></image>
				</view>
			</view>
			<!-- 点击筛选时间 -->
			<view class="filter-box" v-show="showv" :style="{ top: safeAreaInsets.top + 95 + 'px', height: 'calc(100vh - ' + (safeAreaInsets.top + 95) + 'px' + ')' }">
				<view class="filter-container">
					<view class="fillter-warp">
						<view class="title">按时间筛选订单</view>
						<view class="date_box">
							<uni-datetime-picker ref="time1" type="date" :value="startDate" start="2021-3-20" end="2111-6-30" @change="change" />
							<view class="divider"></view>
							<uni-datetime-picker ref="time2" type="date" :value="endDate" start="2021-3-20" end="2111-6-30" @change="change1" />
						</view>
					</view>
					<view class="btn-group">
						<view class="btn reset" @click="reset">重置</view>
						<view class="btn confirm" @click="screen">确定</view>
					</view>
				</view>
			</view>
			<view class="tab_box">
				<scroll-view class="scroll-view_H flexjus" scroll-x="true" :scroll-left="listIndex >= 5 ? '400' : '0'">
					<view :class="[listIndex == index ? 'listTxtActive' : 'listTxt']" v-for="(item, index) in Tablist" :key="index" @click="onActive(index, item.typeTxt, item.id)">
						{{ item.name }}
					</view>
				</scroll-view>
			</view>
		</u-sticky>
		<view v-if="goodsList.length == 0" style="font-size: 24rpx; color: #ccc; padding-top: 30rpx; text-align: center">暂无数据!</view>
		<view v-else>
			<view v-for="(key, index) in goodsList" :key="index">
				<view class="flex flexjus date">
					{{ formatDate(key.createtime) }}
				</view>
				<view v-for="(item, index) in key.orders" :key="index">
					<template v-if="item.order_type == 'goods'">
						<view class="list_box" @click="goGoodsDetails(JSON.stringify(item))">
							<view class="flex flexjus">
								<view class="state_txt s26 familytow fblod">
									{{ item.send_type == 0 ? '物流发货' : item.send_type == 1 ? '商家配送' : item.send_type == 2 ? '到店自提' : item.send_type == 3 ? '礼服预约' : '' }}-{{
										item.is_prepay == 1 ? '定金支付' : item.is_prepay == 0 ? '全款支付' : ''
									}}
								</view>
								<template v-if="item.refundstatus == 0 && item.refund.length == 0">
									<view class="completeAfter" v-if="item.state == 1 && item.paymenttime == null">待支付</view>
									<view class="completeAfter" v-if="item.state == 1 && item.paymenttime !== null">余款未结</view>
									<view class="completeAfter" v-if="item.state == 2">
										<block v-if="item.send_type == 0">
											<block v-if="item.wedding.u_type == 1">待发货</block>
											<block v-else>待确认</block>
										</block>
										<block v-if="item.send_type == 1">
											<block v-if="item.wedding.u_type == 1">待配送</block>
											<block v-else>待确认</block>
										</block>
										<block v-if="item.send_type == 2">
											<block v-if="item.wedding.u_type == 1">待取货</block>
											<block v-else>待确认</block>
										</block>
									</view>
									<view class="completeAfter" v-if="item.state == 3">
										<block v-if="item.send_type != 1">待收货</block>
										<block v-else>配送中</block>
									</view>
									<view class="completeAfter" v-if="item.state == 4">待评价</view>
									<!-- <view class="state_zhifu s26 familytow fblod" v-if="item.state == 5">
										售后中
									</view> -->
									<view class="completeBefore" v-if="item.state == 6">已完成</view>
									<view class="completeBefore" v-if="item.state == 7">已取消</view>
								</template>
							</view>
							<view class="xdr_phone_box flexjus">
								<view class="xdr_txt s24 family f500">下单人/{{ item.username }}</view>
								<view class="phone_txt s24 family f500">手机号/{{ item.mobile }}</view>
							</view>
							<view class="goods_img_name_money flex" v-for="(items, indexs) in item.goods" :key="indexs">
								<view class="goods_img">
									<image class="w100 h100" :src="items.image_src"></image>
								</view>
								<view class="goods_name s26 family f500">
									{{ spceType(items.title, item.sku[0].difference, item.sku[0].spec_type) }}
								</view>
								<view class="goods_money_box">
									<view class="goods_money_top s24 f500 family">
										￥
										<text v-if="item.order_type == 'package'">{{ item.pay.order_price }}</text>
										<text v-else>{{ item.pay.actual_payment }}</text>
									</view>
									<view class="goods_num s22 f500 family txtali">共{{ items.number }}件</view>
								</view>
							</view>
							<view class="edit_state_box flex">
								<!-- 查看拒绝理由的入口-->
								<view
									@click.stop="seeyuanyin(JSON.stringify(item))"
									v-if="item.state == 2"
									style="flex: 1; font-size: 22rpx; color: #ebbe87"
									:style="item.wedding.u_type == 0 ? 'color: #FF3F4A;' : ''"
								>
									<template v-if="item.wedding.u_type == 0">客户已拒绝了此次申请...></template>
									<template v-if="item.wedding.u_type == 3">等待客户确认中...</template>
								</view>
								<view class="b" v-if="item.state == 1 && item.pay.pay_state == 0 && !item.referrer_id" @click.stop="handeTuijian(JSON.stringify(item))">
									{{ item.tjr_status == 3 ? '新增推荐人' : item.tjr_status_text }}
								</view>
								<view class="b" v-if="item.state == 1 && item.pay.pay_state == 0" @click.stop="zsChongzhi(JSON.stringify(item))">
									{{ item.zscz_status == 0 ? (item.is_recharge == 0 ? '赠送充值' : '修改充值') : item.zscz_status_text }}
								</view>
								<template v-if="item.refundstatus == 0 && item.refund.length == 0">
									<view class="b" v-if="item.state == 1 && item.paymenttime == null" @click.stop="edit(JSON.stringify(item))">
										{{ item.order_type == 'package' ? '修改赠品' : '修改价格' }}
									</view>
									<view class="r" v-if="item.state == 1 && item.paymenttime > 0" @click.stop="wanchengForGoods(JSON.stringify(item))">
										{{ item.is_prepay == 1 ? '完成订单/确认' : '完成订单' }}
									</view>
									<view class="b" v-if="item.state == 2 && item.suretime > 0 && item.wedding.u_type == 3" @click.stop="chexiao(JSON.stringify(item))">尾款撤回</view>
									<view class="r" v-if="item.send_type != 1 && item.state == 2 && item.wedding.u_type == 1" @click.stop="onWuEdit(JSON.stringify(item))">
										{{ item.send_type < 2 ? '确认发货' : '确认交货' }}
									</view>
									<view class="r" v-if="item.send_type == 1 && item.state == 2 && item.wedding.u_type == 1" @click.stop="peisong(JSON.stringify(item))">
										{{ item.send_type < 2 ? '开始配送' : '确认收货' }}
									</view>
									<view class="b" v-if="item.state == 3" @click.stop="chehuijiaohuo(JSON.stringify(item))">
										<block v-if="item.send_type != 1">撤销交货</block>
										<block v-else>撤销配送</block>
									</view>
									<view class="r" v-if="item.state == 3" @click.stop="confirm(JSON.stringify(item))">
										<block v-if="item.send_type != 1">确认收货</block>
										<block v-else>配送完成</block>
									</view>
									<view class="b" v-if="item.state == 2 && item.wedding.u_type != 1 && item.wedding.u_type != 3" @click.stop="handelSh(JSON.stringify(item))">
										{{ item.wedding.u_type == 0 ? '重新发送' : '确认订单' }}
									</view>
									<view
										class="b"
										v-if="item.state == 2 && item.wedding.u_type == 3 && item.wedding.status == 0 && item.pay.is_prepay != 1"
										@click.stop="handleChe(JSON.stringify(item))"
									>
										撤销
									</view>
								</template>
							</view>
							<view style="font-size: 22rpx; color: #999; text-align: right">订单日期：{{ item.createtime_text }}</view>
						</view>
					</template>
					<template v-else-if="item.w_type == 1">
						<view class="goods_list_box">
							<view class="flex flexjus">
								<view class="state_txt s30 familytow fblod"></view>
							</view>
							<view class="order_name">
								<view class="order-title">
									{{ item.dress_wedding.type ? '新娘妆预约' : '礼服预约' }}
								</view>
								<view v-if="item.dress_wedding.status == 0" class="completeAfter">已预约</view>
								<view v-if="item.dress_wedding.status == 5" class="completeBefore">已取消</view>
								<view v-if="item.dress_wedding.status == 6" class="completeBefore">未成交</view>
								<view v-if="item.dress_wedding.status == 4" class="completeBefore">已成交</view>
							</view>
							<view class="center" @click="goDetails(JSON.stringify(item))">
								<view class="pic">
									<image :src="item.dress.image_src"></image>
								</view>
								<view class="goods_name">
									{{ item.dress.title }}
								</view>
								<view class="money">
									<view class="price" v-if="!item.dress_wedding.type">￥{{ item.dress.price }}</view>
									<view class="num">共1件</view>
								</view>
							</view>
							<!-- 操作 -->
							<view class="option">
								<view @click.stop="yuyue(JSON.stringify(item), 5)" v-if="item.dress_wedding.status == 0" class="btn">取消预约</view>
								<view @click.stop="yuyue(JSON.stringify(item), 6)" v-if="item.dress_wedding.status == 0" class="btn">未成交</view>
								<view @click.stop="yuyue(JSON.stringify(item), 4)" v-if="item.dress_wedding.status == 0" class="btn">已成交</view>
							</view>
							<view class="time">订单日期：{{ item.createtime_text }}</view>
						</view>
					</template>
					<template v-else>
						<view @click="goDetails(JSON.stringify(item))" class="list_box">
							<view class="flex flexjus">
								<view class="state_txt s26 familytow fblod">
									{{ item.is_prepay == 1 ? '定金支付' : item.is_prepay == 0 ? '全款支付' : '' }}
								</view>
								<!-- 状态 -->
								<template v-if="item.refundstatus == 0 && item.refund.length == 0">
									<template v-if="item.is_prepay == 0">
										<view v-if="item.state == 1" class="completeAfter">未支付</view>
									</template>
									<template v-if="item.is_prepay == 1">
										<template v-if="item.refundstatus == 0">
											<view v-if="item.state == 1 && !(item.paymenttime > 0)" class="completeAfter">未支付</view>
											<view v-if="item.state == 1 && item.paymenttime > 0" class="completeAfter">
												<!-- 商所有的定金支付订单，在支付定金后，把状态 “待付尾款”全部“余款未结" -->
												<!-- 待付尾款 -->
												余款未结
											</view>
										</template>
									</template>
									<view v-if="item.state == 2 && item.wedding.status == 6 && item.paymenttime > 0 && item.wedding.u_type != 1" class="completeAfter">待排期</view>
									<view
										v-if="
											item.state == 2 &&
											((item.wedding.status == 6 && item.paymenttime > 0 && item.wedding.u_type == 1) ||
												(item.wedding.status == 7 && item.wedding.u_type == 0) ||
												(item.wedding.status == 1 && item.wedding.u_type == 3))
										"
										class="completeAfter"
									>
										已排期、待拍摄
									</view>
									<view v-if="item.state == 7" class="completeBefore">已取消</view>
									<view
										v-if="(item.wedding.status == 1 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) || (item.wedding.status == 2 && item.wedding.u_type == 3)"
										class="completeAfter"
									>
										已拍摄、待选样
									</view>
									<view
										v-if="(item.wedding.status == 2 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) || (item.wedding.status == 3 && item.wedding.u_type == 3)"
										class="completeAfter"
									>
										已选样、待看板
									</view>
									<view
										v-if="(item.wedding.status == 3 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) || (item.wedding.status == 4 && item.wedding.u_type == 3)"
										class="completeAfter"
									>
										{{ item.wedding.t_status == 0 ? '已看板' : item.wedding.t_status == 1 ? '不看板' : '' }}、待取件
									</view>
									<view v-if="item.wedding.u_type == 1 && item.wedding.status == 4" class="completeBefore">已取件、已结束</view>
								</template>
								<template v-else>
									<view class="completeAfter" v-if="item.refundstatus == 1">申请中</view>
									<view class="completeBefore" v-if="item.refundstatus == 2">取消订单已通过</view>
									<view class="completeBefore" v-if="item.refundstatus == 3">取消订单未通过</view>
								</template>
							</view>
							<view class="xdr_phone_box flexjus">
								<view class="xdr_txt s24 family f500">下单人/{{ item.username }}</view>
								<view class="phone_txt s24 family f500">手机号/{{ item.mobile }}</view>
							</view>
							<view class="goods_img_name_money flex" v-for="(items, indexs) in item.goods" :key="indexs">
								<view class="goods_img">
									<image class="w100 h100" :src="items.image_src"></image>
								</view>
								<view class="goods_name s26 family f500">
									{{ items.title }}
								</view>
								<view class="goods_money_box">
									<view class="goods_money_top s24 f500 family">￥{{ item.pay.actual_payment }}</view>
									<view class="goods_num s22 f500 family txtali">共{{ items.number }}件</view>
								</view>
							</view>
							<!-- 操作 -->
							<view v-if="item.refundstatus == 0 && item.paymenttime == null" style="margin-top: 24rpx; display: flex; flex-direction: row-reverse; padding-bottom: 20rpx">
								<view v-if="item.state == 1 && item.paymenttime == null" class="b" @click.stop="edit(JSON.stringify(item))">修改价格</view>
								<view class="b" v-if="item.state == 1 && item.pay.pay_state == 0" @click.stop="zsChongzhi(JSON.stringify(item))">
									{{ item.zscz_status == 0 ? (item.is_recharge == 0 ? '赠送充值' : '修改充值') : item.zscz_status_text }}
								</view>
								<view class="b" v-if="item.state == 1 && item.pay.pay_state == 0 && !item.referrer_id" @click.stop="handeTuijian(JSON.stringify(item))">
									{{ item.tjr_status == 3 ? '新增推荐人' : item.tjr_status_text }}
								</view>
								<template v-if="item.change == null || item.change.status == 1">
									<view @click.stop="seeyuanyin(JSON.stringify(item))" style="flex: 1; font-size: 22rpx; color: #ebbe87" :style="item.wedding.u_type == 0 ? 'color: #FF3F4A;' : ''">
										<template v-if="item.wedding.u_type == 3 && item.wedding.status != 0">等待客户确认中...</template>
										<template v-if="item.wedding.u_type == 0">客户已拒绝了此次申请...></template>
									</view>
									<view style="display: flex; align-items: center">
										<view
											@click.stop="handle(1, JSON.stringify(item), 2, null, item.wedding.u_type == 0 ? '重新确认' : '确认选样')"
											v-if="
												(item.wedding.status == 1 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) ||
												(item.wedding.status == 2 && item.wedding.u_type != 3 && item.wedding.u_type != 1 && item.wedding.u_type != 0)
											"
											class="btny"
										>
											{{ item.wedding.u_type == 0 ? '重新确认' : '确认选样' }}
										</view>
										<view
											@click.stop="handle(1, JSON.stringify(item), 3, 0, item.wedding.u_type == 0 ? '确认看板' : '确认看板')"
											v-if="
												(item.wedding.status == 2 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) ||
												(item.wedding.status == 3 && item.wedding.u_type != 3 && item.wedding.u_type != 1 && item.wedding.u_type != 0)
											"
											class="btny"
										>
											{{ item.wedding.u_type == 0 ? '确认看板' : '确认看板' }}
										</view>
										<view
											@click.stop="handle(1, JSON.stringify(item), 3, 1, '不看板')"
											v-if="
												(item.wedding.status == 2 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) ||
												(item.wedding.status == 3 && item.wedding.u_type != 3 && item.wedding.u_type != 1 && item.wedding.u_type != 0)
											"
											class="btny"
										>
											{{ item.wedding.u_type == 0 ? '不看板' : '不看板' }}
										</view>
										<view
											@click.stop="handle(1, JSON.stringify(item), 4, null, item.wedding.u_type == 0 ? '重新确认' : '确认取件')"
											v-if="
												(item.wedding.status == 3 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) ||
												(item.wedding.status == 4 && item.wedding.u_type != 3 && item.wedding.u_type != 1 && item.wedding.u_type != 0)
											"
											class="btny"
										>
											{{ item.wedding.u_type == 0 ? '重新确认' : '确认取件' }}
										</view>
										<view @click.stop="handle(2, JSON.stringify(item))" v-if="item.wedding.u_type == 3 && item.wedding.status > 0" class="b">撤销操作</view>
									</view>
								</template>
								<template v-else>
									<view
										v-if="[0, 2].indexOf(item.change.status) != -1"
										@click.stop="seeyuanyin(JSON.stringify(item.change), 1)"
										style="flex: 1; font-size: 22rpx; color: #ebbe87"
										:style="item.change.status == 2 ? 'color: #FF3F4A;' : ''"
									>
										<template v-if="item.change.status == 0">等待客户确认中...</template>
										<template v-if="item.change.status == 2">客户已拒绝了此次申请...></template>
									</view>

									<view v-if="item.change.status == 0"></view>
									<view @click.stop="chongxintiaohuan(JSON.stringify(item))" v-if="item.change.status == 2" class="btny">重新确认</view>
								</template>
							</view>
							<view v-else style="margin-top: 24rpx; display: flex; justify-content: flex-end; align-items: center; padding-bottom: 20rpx">
								<view class="b" v-if="item.state == 1 && item.pay.pay_state == 0" @click.stop="zsChongzhi(JSON.stringify(item))">
									{{ item.zscz_status == 0 ? (item.is_recharge == 0 ? '赠送充值' : '修改充值') : item.zscz_status_text }}
								</view>

								<!-- 查看拒绝理由的入口-->
								<view
									@click.stop="seeyuanyin(JSON.stringify(item))"
									class=""
									v-if="[0, 3].indexOf(item.wedding.u_type) != -1"
									style="flex: 1; font-size: 22rpx; color: #ebbe87"
									:style="item.wedding.u_type == 0 ? 'color: #FF3F4A;' : ''"
								>
									<template v-if="item.wedding.u_type == 3 && item.wedding.status != 0">等待客户确认中...</template>
									<template v-if="item.wedding.u_type == 0">客户已拒绝了此次申请...></template>
								</view>

								<!-- 收尾款操作 -->
								<view class="r" v-if="item.state == 1 && item.paymenttime > 0" @click.stop="wancheng(JSON.stringify(item))">完成订单/排期</view>
								<view
									v-if="item.state == 2 && item.wedding.status == 6 && item.paymenttime > 0 && item.wedding.u_type != 1 && item.wedding.u_type != 3"
									@click.stop="handle(1, JSON.stringify(item), 6, null, item.wedding.u_type == 0 ? '重新发送' : '排期确认')"
									class="btny"
								>
									{{ item.wedding.u_type == 0 ? '重新发送' : '排期确认' }}
								</view>

								<view
									v-if="item.state == 2 && ((item.wedding.status == 6 && item.wedding.u_type == 1) || (item.wedding.status == 7 && item.wedding.u_type == 0))"
									@click.stop="handle(1, JSON.stringify(item), 1, null, item.wedding.u_type == 0 ? '重新确认' : '确认拍摄')"
									class="btny"
								>
									{{ item.wedding.u_type == 0 ? '重新确认' : '确认拍摄' }}
								</view>

								<view
									v-if="item.state == 2 && item.wedding.status == 1 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)"
									@click.stop="handle(1, JSON.stringify(item), 2, null, item.wedding.u_type == 0 ? '重新确认' : '确认选样')"
									class="btny"
								>
									{{ item.wedding.u_type == 0 ? '重新确认' : '确认选样' }}
								</view>

								<view
									@click.stop="handle(1, JSON.stringify(item), 3, 0, '确认看板')"
									v-if="item.state == 4 && item.wedding.status == 2 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)"
									class="btny"
								>
									确认看板
								</view>

								<view
									@click.stop="handle(1, JSON.stringify(item), 3, 1, '不看板')"
									v-if="item.state == 4 && item.wedding.status == 2 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)"
									class="btny"
								>
									不看板
								</view>

								<view
									@click.stop="handle(1, JSON.stringify(item), 4, null, item.wedding.u_type == 0 ? '重新确认' : '确认取件')"
									v-if="
										(item.wedding.status == 3 && (item.wedding.u_type == 1 || item.wedding.u_type == 0)) ||
										(item.wedding.status == 4 && item.wedding.u_type != 3 && item.wedding.u_type != 1 && item.wedding.u_type != 0)
									"
									class="btny"
								>
									{{ item.wedding.u_type == 0 ? '重新确认' : '确认取件' }}
								</view>

								<view @click.stop="handle(2, JSON.stringify(item))" v-if="item.wedding.u_type == 3 && item.wedding.status > 0" class="b">撤销操作</view>

								<!-- 订单取消操作 -->
								<view class="b" v-if="item.refundstatus == 1" @click.stop="jujuequxiao(JSON.stringify(item))">拒绝取消</view>
								<view class="r" v-if="item.refundstatus == 1" @click.stop="tongyiquxiao(JSON.stringify(item))">同意取消</view>
							</view>
							<view style="font-size: 22rpx; color: #999; text-align: right">订单日期：{{ item.createtime_text }}</view>
						</view>
					</template>
				</view>
			</view>
		</view>

		<!-- 确认操作弹窗 -->
		<uni-popup ref="confirm" type="center">
			<view class="dialog-container">
				<view class="title">{{ popupTitle }}</view>
				<view class="content">是否确认此次提交状态？</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('confirm')">取消</view>
					<view class="btn confirm" @click="confirmHandle">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 确认撤回操作弹窗 -->
		<uni-popup ref="revoke" type="center">
			<view class="dialog-container">
				<view class="title">撤回操作</view>
				<view class="content">是否撤回此次提交状态？</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('revoke')">取消</view>
					<view class="btn confirm" @click="chexiaocaozuo">撤回</view>
				</view>
			</view>
		</uni-popup>
		<!-- 完成提示弹窗 -->
		<uni-popup ref="end" type="center">
			<view class="dialog-container">
				<view class="title">{{ popupTitle }}</view>
				<view class="content">需用户确认后改变订单状态！</view>
				<view class="btn-group">
					<view class="btn confirm" @click="cencle('end')">知道了</view>
				</view>
			</view>
		</uni-popup>
		<!-- 定金支付-完成订单确认 -->
		<uni-popup ref="confirmOrder" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">{{ popupContent }}</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('confirmOrder')">取消</view>
					<view class="btn confirm" @click="confirmOrder">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 定金支付-尾款撤回 -->
		<uni-popup ref="weikuanchehui" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">确认是否尾款撤回？</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('weikuanchehui')">取消</view>
					<view class="btn confirm" @click="weikuanchehui">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 调整充值弹框 -->
		<uni-popup ref="chongzhi" type="center">
			<view class="chongzhiPopup">
				<view class="title">
					{{ orderResult.is_recharge ? '修改/调整充值' : '赠送/调整充值' }}
				</view>
				<uni-icons type="clear" size="26" color="#ebbe87" style="position: absolute; right: 40rpx; top: 40rpx; z-index: 2" @click="$refs.chongzhi.close()"></uni-icons>
				<view style="width: 476rpx; max-height: 70vh; margin: 0 auto; margin-top: 48rpx; overflow-y: auto">
					<view v-for="(item, index) in checkShopList" :key="item.id">
						<view class="shopTitle">
							<text style="font-weight: bold">{{ item.shopname }}</text>
							<!-- <uni-icons type="trash" size="20" color="#ebbe87" @click="delShop(item.id)"></uni-icons> -->
							<text style="font-size: 24rpx; color: #999" @click="delShop(item.id)">删除</text>
						</view>
						<view class="content">
							<text style="color: red">*</text>
							该店铺充值上限为{{ item.bonds }}元。目前已充值{{ Number(item.cz_money).toFixed(2) }}元，本次可调整上限为{{ Number(item.yu_money).toFixed(2) }}元。
						</view>
						<view class="inputWarp">
							<u--input
								v-model="item.choneMoney"
								type="digit"
								@blur="onInput(index, item.choneMoney)"
								suffixIcon="(元)"
								suffixIconStyle="color: #333;font-size: 28rpx"
								placeholder="录入充值金额"
							></u--input>
						</view>
					</view>
					<view @click="handleChooseShop" class="shopNameWarp">
						<view class="shopNameFont">点击选择店铺</view>
					</view>
					<view class="submitBtn" @click="handleSubmit">提交</view>
				</view>
			</view>
		</uni-popup>
		<!-- 添加店铺 -->
		<u-popup ref="chooseDP" :show="shopPopupShow" @close="handleCloseShow" :round="10">
			<view class="popup-container">
				<view class="title">添加店铺</view>
				<uni-icons type="clear" size="30" color="#e9ddcf" style="position: absolute; top: 24rpx; right: 20rpx" @click="$refs.chooseDP.close()"></uni-icons>
				<view style="border-radius: 48rpx; width: 100%; margin-bottom: 40rpx; border: 1px solid #cdcdcd; box-sizing: border-box">
					<u-input v-model="searchContent" shape="circle" clearable confirmType="搜索" placeholder="关键词搜索店铺" @input="searchDP"></u-input>
				</view>
				<scroll-view style="max-height: 90vh">
					<view class="checkBox">
						<u-checkbox-group v-model="chooseShopArr" placement="column" @change="chooseShop">
							<u-checkbox
								v-for="(item, index) in groupsArr"
								:key="index"
								:customStyle="{ marginBottom: '15px' }"
								shape="circle"
								activeColor="#EBBE87"
								:label="item.shopname"
								:name="item.id"
							/>
						</u-checkbox-group>
					</view>
				</scroll-view>
				<view style="margin-top: 40rpx">
					<u-button shape="circle" color="#EBBE87" @click="confirmDP">确定</u-button>
				</view>
			</view>
		</u-popup>
		<!-- 提示联系客户确认档期 -->
		<u-popup :show="paiShow" @close="handleCloseShow" :round="10" mode="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">请先联系客户确认老师与档期的调整</view>
				<view class="btn-group">
					<u-button class="btn" shape="circle" color="#EBBE87" @click="confirmTKL">确定</u-button>
				</view>
			</view>
		</u-popup>
		<!-- 预约状态管理 -->
		<uni-popup ref="yuyue" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">{{ popupContent }}</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('yuyue')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 物流发货 -->
		<uni-popup ref="wuliufahuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('wuliufahuo')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 确认退款 -->
		<uni-popup ref="querentuikuan" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('querentuikuan')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 退商家自收款 -->
		<uni-popup ref="tuishangjiazishoukuan" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('tuishangjiazishoukuan')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 退货已收 -->
		<uni-popup ref="tuihuoyishou" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('tuihuoyishou')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 同意退货 -->
		<uni-popup ref="tongyituihuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('tongyituihuo')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 拒绝退货 -->
		<uni-popup ref="jujuetuihuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('jujuetuihuo')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 拒绝取消 -->
		<uni-popup ref="jujuequxiao" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('jujuequxiao')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 同意取消 -->
		<uni-popup ref="tongyiquxiao" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('tongyiquxiao')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 确认收货 -->
		<uni-popup ref="shouhuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">{{ popupContent }}</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('shouhuo')">取消</view>
					<view class="btn confirm" @click="confirmShouhuo">
						<block v-if="data.send_type != 1">确定</block>
						<block v-else>已收货</block>
					</view>
				</view>
			</view>
		</uni-popup>
		<!-- 撤销交货 -->
		<uni-popup ref="chehuijiaohuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">{{ popupContent }}</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('chehuijiaohuo')">取消</view>
					<view class="btn confirm" @click="confirmBack">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 确认发货 -->
		<uni-popup ref="fahuo" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content"></view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('fahuo')">取消</view>
					<view class="btn confirm" @click="">确定</view>
				</view>
			</view>
		</uni-popup>
		<!-- 确认配送 -->
		<uni-popup ref="peisong" type="center">
			<view class="dialog-container">
				<view class="title">提示</view>
				<view class="content">确定开始配送？</view>
				<view class="btn-group">
					<view class="btn cancel" @click="cencle('peisong')">取消</view>
					<view class="btn confirm" @click="confirmPeisong">配送</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
import timeFormat from '@/libs/function/timeFormat.js';
export default {
	data() {
		return {
			title: '',
			image: '../static/tab_jian.png',
			color: 'black',
			showPicker: true,
			paiShow: false,
			groupsArr: [],
			chooseShopId: '',
			orderResult: null,
			itemOrderResult: null,
			choneMoney: '',
			shopPopupShow: false,
			list: [],
			shopId: null,
			goodsList: [],
			page: 1,
			totalNum: 1,
			background: '#ffffff',
			navIndex: 0, //nav选项
			startDate: '',
			endDate: '',
			keyword: '',
			index: 0,
			data: {}, //婚纱操作参数
			type: 0, //1 确认操作 2 撤回操作
			listIndex: 0,
			Tablist: [
				{
					name: '全部订单',
					typeTxt: '暂无购买记录！',
					id: 0
				},
				{
					name: '待付款',
					typeTxt: '暂无需付款订单~',
					id: 1
				},
				{
					name: '已支付',
					typeTxt: '暂无支付商品~',
					id: 2
				},
				{
					name: '待收货',
					typeTxt: '还未购买商品~',
					id: 3
				},
				{
					name: '待评价',
					typeTxt: '暂无需评价订单~',
					id: 4
				},
				{
					name: '退款/售后',
					typeTxt: '暂无购买记录~',
					id: 5
				}
			],
			shopType: null,
			userInfo: {},
			tabId: 0,
			timer: null,
			searchContent: '', //搜索店铺名称
			chooseShopArr: [], //可选择的店铺列表
			checkShopList: [], //页面渲染的已选择的店铺
			popupTitle: '', //弹窗标题
			popupContent: '', //弹窗内容
			showv: false,
			safeAreaInsets: null
		};
	},
	onLoad(options) {
		uni.showLoading({
			title: '数据请求中···'
		});
		this.userInfo = uni.getStorageSync('userInfo');
		this.shopType = options?.shopType;
		this.shopId = options?.shopId;
		this.index = options?.index;
		this.listIndex = options?.listIndex;
		if (this.shopType == 1) {
			this.Tablist = [
				{
					name: '全部订单',
					typeTxt: '暂无购买记录！',
					id: 0
				},
				{
					name: '待付款',
					typeTxt: '暂无需付款订单~',
					id: 1
				},
				{
					name: '已支付',
					typeTxt: '暂无支付商品~',
					id: 2
				},
				{
					name: '待拍摄',
					typeTxt: '暂无拍摄商品~',
					id: 3
				},
				{
					name: '待选样',
					typeTxt: '暂无选样商品~',
					id: 4
				},
				{
					name: '待看板',
					typeTxt: '暂无看板商品~',
					id: 5
				},
				{
					name: '待取件',
					typeTxt: '暂无取件商品~',
					id: 6
				},
				{
					name: '待评价',
					typeTxt: '暂无需评价订单~',
					id: 7
				},
				{
					name: '退款/售后',
					typeTxt: '暂无购买记录~',
					id: 8
				}
			];
		}
	},
	onShow() {
		const { safeAreaInsets } = uni.getSystemInfoSync();
		this.safeAreaInsets = safeAreaInsets;
		if (!this.list.length) {
			this.getShopList();
		}
		this.getOrderList();
	},
	onReachBottom() {
		this.page++;
		if (this.page > this.totalNum) {
			return this.$wanlshop.msg('我是有底线的');
		}
		this.getOrderList();
	},
	methods: {
		handleChooseShop() {
			this.shopPopupShow = true;
			const data = JSON.parse(JSON.stringify(this.groupsArr));
			this.chooseShopArr = data.filter((item) => item.chcked).map((key) => key.id);
		},
		handleCloseShow() {
			this.shopPopupShow = false;
		},
		formattedDate(dateStr = '') {
			// 获取并格式化日期
			return dateStr ? dateStr.split(' ')[0] : ''; // 或者使用 substring 方法
		},
		//格式化日期
		formatDate(val) {
			return timeFormat(val, 'yyyy年mm月dd日');
		},
		//提交店铺充值数据
		handleSubmit() {
			const data = JSON.parse(JSON.stringify(this.checkShopList));
			const flag = data.every((item) => item.choneMoney.length > 0);
			if (!flag) {
				return uni.showToast({
					title: '有店铺充值金额未填写，请输入充值金额',
					icon: 'none',
					mask: true
				});
			}
			this.$request({
				url: 'manage/chong_zhi',
				method: 'post',
				data: {
					order_id: this.orderResult.id,
					user_id: this.orderResult.user_id,
					recharge: data.map((key) => {
						return {
							shop_id: key.id,
							money: key.choneMoney
						};
					})
				}
			}).then((res) => {
				const { code, msg } = res.data;
				if (code == 1) {
					uni.showToast({
						icon: 'success',
						title: '提交成功'
					});
					this.refresh();
					this.$refs.chongzhi.close();
				} else {
					uni.showToast({
						title: msg,
						icon: 'error'
					});
				}
			});
		},
		// 确认订单
		handelSh(item) {
			item = JSON.parse(item);
			this.data = {
				id: item.id,
				is_confirm_order: 1
			};
			this.popupTitle = '确认订单';
			this.$refs['confirm'].open();
		},
		// 切换订单状态
		onActive(ind, txt, tabid) {
			this.listIndex = ind;
			this.listTxt = txt;
			this.tabId = tabid;
			this.goodsList = [];
			this.getOrderList();
		},
		//婚纱订单详情
		goDetails(item) {
			item = JSON.parse(item);
			item.is_mange = 1;
			uni.navigateTo({
				url: '/pages/schedule/weddingDressOrderDetails?orderInfo=' + encodeURIComponent(JSON.stringify(item))
			});
		},
		// 拒绝更换档期/老师后 重新提交
		chongxintiaohuan(item) {
			item = JSON.parse(item);
			item.is_mange = 1;
			item.chongxintiaohuan = 1;
			uni.navigateTo({
				url: '/pages/schedule/weddingDressOrderDetails?orderInfo=' + encodeURIComponent(JSON.stringify(item))
			});
		},
		// 预约状态管理
		yuyue(item, type) {
			let that = this;
			item = JSON.parse(item);
			if (type == 5) {
				this.popupContent = '确认取消预约吗？';
			} else if (type == 6) {
				this.popupContent = '确认未提交吗？';
			} else {
				this.popupContent = '确认已提交吗？';
			}
			uni.showModal({
				title: '提示',
				content: type == 5 ? '确认取消预约吗？' : type == 6 ? '确认未提交吗？' : '确认已提交吗?',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/wedding_appointment_status',
								method: 'POST',
								data: {
									id: item.dress_wedding.id,
									status: type
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		confirmTKL() {
			this.paiShow = false;
		},
		//婚纱撤销操作
		chexiaocaozuo() {
			let that = this;
			let item = this.data;
			if (item.is_confirm_order) {
				this.$request({
					url: 'manage/confrim_order',
					method: 'POST',
					data: {
						id: item.id,
						type: 2
					}
				}).then((res) => {
					if (res.data.code == 1) {
						this.$wanlshop.msg('操作成功');
						this.refresh();
						this.$refs['revoke'].close();
					}
				});
			} else {
				if (item.state == 1) {
				}
				that
					.$request({
						url: 'wedding/return_status',
						method: 'POST',
						data: that.data
					})
					.then((res) => {
						if (res.statusCode == 200) {
							that.$wanlshop.msg('操作成功');
							that.page = 1;
							that.getOrderList();
							this.$refs['revoke'].close();
						}
					});
			}
		},
		// 查看拒绝原因
		seeyuanyin(item, type) {
			item = JSON.parse(item);
			if (type == 1) {
				uni.navigateTo({
					url: './reason?content=' + item.content
				});
				return;
			}
			if (item.wedding.u_type == 0) {
				uni.navigateTo({
					url: './reason?content=' + item.wedding.u_content
				});
			}
		},
		//商家婚纱订单操纵
		handle(type, item, status, t_status, name = '') {
			item = JSON.parse(item);
			this.type = type;
			this.data = {
				id: item.wedding.id,
				status, //1已拍摄2已选样3已看板4已取件
				user_id: this.userInfo.id,
				iden: 0
			};
			if (name == '确认拍摄' && item.state == 2 && ((item.wedding.status == 6 && item.wedding.u_type == 1) || (item.wedding.status == 7 && item.wedding.u_type == 0))) {
				if (item.change?.status == '0') {
					this.paiShow = true;
				} else {
					this.popupTitle = name;
					this.$refs['confirm'].open();
				}
			} else {
				this.popupTitle = '';
				if (status == 3) {
					this.data.t_status = t_status; //0看板1不看版
				}
				if (type == 1) {
					this.popupTitle = name;
					this.$refs['confirm'].open();
				} else if (type == 2) {
					this.data = {
						id: item.wedding.id,
						status: item.wedding.status, //1已拍摄2已选样3已看板4已取件
						user_id: this.userInfo.id
					};
					this.$refs['revoke'].open();
				}
			}
		},
		confirmHandle() {
			let data = this.data;
			if (data.is_confirm_order) {
				this.$request({
					url: 'manage/confrim_order',
					method: 'POST',
					data: {
						id: data.id,
						type: 1
					}
				}).then((res) => {
					if (res.data.code == 1) {
						this.$refs['confirm'].close();
						this.$refs['end'].open();
						this.refresh();
					}
				});
			} else {
				this.$request({
					url: 'wedding/appointment_status_update',
					method: 'POST',
					data: this.data
				}).then((res) => {
					if (res.data.code == 1) {
						if (this.type == 1) {
							this.$refs['confirm'].close();
							this.$refs['end'].open();
						} else {
							this.$wanlshop.msg('操作成功!');
						}
						this.refresh();
					}
				});
			}
		},
		cencle(name) {
			this.$refs[name].close();
		},
		//刷新列表
		refresh() {
			this.page = 1;
			this.getOrderList();
		},
		//售后确认发货
		querenfahuo(item) {
			item = JSON.parse(item);
			let that = this;
			if (item.send_type == 0) {
				// 物流发货
				uni.showModal({
					title: '提示',
					content: '是否发货!',
					success: (res) => {
						if (res.confirm) {
							let data = {
								...item,
								shopname: this.list[this.index].shopname,
								flag: 0
							};
							uni.setStorageSync('goodsData', data);
							uni.navigateTo({
								url: `/pages/filePages/storeDetails/priceEdit`
							});
						} else if (res.cancel) {
							return false;
						}
					}
				});
			} else if (item.send_type == 1) {
				//商家配送
				this.$request({
					url: 'manage/refund_address',
					method: 'POST',
					data: {
						id: item.refund.id,
						express_name: '',
						express_no: ''
					}
				}).then((res) => {
					if (res.statusCode == 200) {
						that.$wanlshop.msg('操作成功!');
						that.page = 1;
						that.getOrderList();
					}
				});
			} else if (item.send_type == 2) {
				//到店自提
				this.$request({
					url: 'manage/refund_address',
					method: 'POST',
					data: {
						id: item.refund.id,
						express_name: '',
						express_no: ''
					}
				}).then((res) => {
					if (res.statusCode == 200) {
						that.$wanlshop.msg('操作成功!');
						that.page = 1;
						that.getOrderList();
					} else {
					}
				});
			}
		},
		//点击起始时间
		clickTime(e) {
			if (e == 1) {
				this.$refs.time1.show();
			} else {
				this.$refs.time2.show();
			}
		},
		//点击nav选项
		changeNavIndex(e) {
			if (e == 3) {
				this.showTime = !this.showTime;
				return;
			}
			this.navIndex = e;
			this.page = 1;
			this.getOrderList();
		},
		//获取店铺列表
		getShopList() {
			this.$request({
				url: 'wedding/shop_list',
				method: 'POST',
				data: {
					keyword: '',
					type: 1
				}
			}).then((res) => {
				this.list = res.data.data;
			});
		},
		handleShopName(item) {
			this.chooseShopId = item.id;
			this.shopPopupShow = false;
		},
		// 获取订单列表
		getOrderList() {
			let that = this;
			this.$request({
				url: 'manage/orders1',
				data: {
					shop_id: that.shopId,
					start: that.startDate,
					end: that.endDate,
					page: this.page,
					order_type: this.navIndex,
					type: 0,
					keyword: this.keyword,
					tabId: this.tabId,
					shopType: this.shopType,
					limit: 3
				},
				method: 'POST'
			}).then((res) => {
				uni.hideLoading();
				const { code, data, msg } = res.data;
				if (code == 1) {
					that.totalNum = data.last_page;
					if (that.page == 1) {
						that.goodsList = [...data.data];
					} else {
						that.goodsList = [...that.goodsList, ...data.data];
					}
				} else {
					uni.showToast({
						title: msg,
						icon: 'error'
					});
				}
			});
		},
		//筛选点击展开和收起
		expandAndCollapse() {
			this.showv = !this.showv;
		},
		// 筛选订单
		screen() {
			this.page = 1;
			this.showv = false;
			this.goodsList = [];
			uni.showLoading({
				title: '数据请求中···'
			});
			this.getOrderList();
		},
		//重置按钮
		reset() {
			this.startDate = '';
			this.endDate = '';
			this.showv = false;
			this.goodsList = [];
			uni.showLoading({
				title: '数据请求中···'
			});
			this.getOrderList();
		},
		//搜索订单
		search() {
			this.page = 1;
			this.goodsList = [];
			uni.showLoading({
				title: '数据请求中···'
			});
			this.getOrderList();
		},
		// 获取店铺id
		getPicker(data) {
			this.page = 1;
			this.tabId = 0;
			this.listIndex = 0;
			this.index = data;
			this.shopId = this.list[data].id;
			this.shopType = this.list[data].is_photography;
			this.goodsList = [];
			uni.showLoading({
				title: '数据请求中···'
			});
			if (this.shopType == 0) {
				this.Tablist = [
					{
						name: '全部订单',
						typeTxt: '暂无购买记录！',
						id: 0
					},
					{
						name: '待付款',
						typeTxt: '暂无需付款订单~',
						id: 1
					},
					{
						name: '已支付',
						typeTxt: '暂无支付商品~',
						id: 2
					},
					{
						name: '待收货',
						typeTxt: '还未购买商品~',
						id: 3
					},
					{
						name: '待评价',
						typeTxt: '暂无需评价订单~',
						id: 4
					},
					{
						name: '退款/售后',
						typeTxt: '暂无购买记录~',
						id: 5
					}
				];
			} else if (this.shopType == 1) {
				this.Tablist = [
					{
						name: '全部订单',
						typeTxt: '暂无购买记录！',
						id: 0
					},
					{
						name: '待付款',
						typeTxt: '暂无需付款订单~',
						id: 1
					},
					{
						name: '已支付',
						typeTxt: '暂无支付商品~',
						id: 2
					},
					{
						name: '待拍摄',
						typeTxt: '暂无拍摄商品~',
						id: 3
					},
					{
						name: '待选样',
						typeTxt: '暂无选样商品~',
						id: 4
					},
					{
						name: '待看板',
						typeTxt: '暂无看板商品~',
						id: 5
					},
					{
						name: '待取件',
						typeTxt: '暂无取件商品~',
						id: 6
					},
					{
						name: '待评价',
						typeTxt: '暂无需评价订单~',
						id: 7
					},
					{
						name: '退款/售后',
						typeTxt: '暂无购买记录~',
						id: 8
					}
				];
			}
			this.page = 1;
			this.getOrderList();
		},
		// 选择开始日期
		change(e) {
			this.startDate = e;
		},
		// 选择结束日期
		change1(e) {
			this.endDate = e;
		},
		// 跳转待付款页
		goGoodsDetails(item) {
			item = JSON.parse(item);
			let data = {
				id: item.id,
				shop_id: this.shopId,
				refundstatus: item.refundstatus,
				refund: item.refund,
				is_prepay: item.is_prepay,
				wedding: item.wedding
			};
			uni.navigateTo({
				url: `../storeDetails/storeDetails?data=${JSON.stringify(data)}&state=1`
			});
		},
		// 确认退款
		querentuikuan(item) {
			let that = this;
			uni.showModal({
				title: '提示',
				content: '确认退款吗！',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/money_refund',
								method: 'POST',
								data: {
									id: item.refund.id
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
					}
				}
			});
		},
		//退商家自收款
		tuishangjiazishoukuan(item) {
			let that = this;
			uni.showModal({
				title: '提示',
				content: '请联系客户，在平台退换货/售后中确认收到你的:"自收款"。',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/money_refund_second',
								method: 'POST',
								data: {
									id: item.refund.id
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		//退货已收
		tuihuoyishou(item) {
			let that = this;
			uni.showModal({
				title: '提示',
				content: '确认收到货物吗!',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/receivingRefund',
								method: 'POST',
								data: {
									id: item.refund.id
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		//同意退货
		tongyituihuo(item) {
			let that = this;
			uni.showModal({
				title: '提示',
				content: '确认同意退货吗!',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/refund_do',
								method: 'POST',
								data: {
									id: item.refund.id,
									refuse_content: ''
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		//拒绝退货
		jujuetuihuo(item) {
			let that = this;
			uni.showModal({
				title: '拒绝理由',
				content: '',
				placeholderText: '请输入拒绝理由',
				editable: true,
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/refund_no',
								method: 'POST',
								data: {
									id: item.refund.id,
									refuse_content: res.content
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		// 拒绝取消
		jujuequxiao(item) {
			item = JSON.parse(item);
			let that = this;
			uni.showModal({
				title: '拒绝理由',
				content: '',
				placeholderText: '请输入拒绝理由',
				editable: true,
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/cancelOrder',
								method: 'POST',
								data: {
									id: item.id,
									status: 3,
									content: res.content
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		// 同意取消
		tongyiquxiao(item) {
			item = JSON.parse(item);
			let that = this;
			uni.showModal({
				title: '提示',
				content: '此操作将发起退款命令!',
				success: (res) => {
					if (res.confirm) {
						that
							.$request({
								url: 'manage/cancelOrder',
								method: 'POST',
								data: {
									id: item.id,
									status: 2,
									content: ''
								}
							})
							.then((res) => {
								if (res.statusCode == 200) {
									that.$wanlshop.msg('操作成功');
									that.page = 1;
									that.getOrderList();
								}
							});
					} else if (res.cancel) {
						return false;
					}
				}
			});
		},
		// 确认收货
		confirm(item) {
			item = JSON.parse(item);
			this.data = item;
			this.popupContent = '客户是否已收到货!';
			this.$refs['shouhuo'].open();
		},
		// 跳转修改价格页
		edit(item) {
			item = JSON.parse(item);
			let data = {
				...item,
				shopname: this.list[this.index].shopname,
				flag: 0
			};
			uni.setStorageSync('goodsData', data);
			uni.navigateTo({
				url: `/pages/filePages/storeDetails/priceEdit`
			});
		},
		//撤销交货
		chehuijiaohuo(item) {
			item = JSON.parse(item);
			this.data = item;
			this.popupContent = item.send_type != 1 ? '是否撤销交货？' : '是否撤回配送？';
			this.$refs['chehuijiaohuo'].open();
		},
		//撤销交货接口请求
		confirmBack() {
			const that = this;
			const item = this.data;
			this.$request({
				url: 'manage/delivery_return',
				method: 'POST',
				data: {
					id: item.id
				}
			}).then((res) => {
				if (res.data.code == 1) {
					that.$refs['chehuijiaohuo'].close();
					that.$wanlshop.msg('操作成功!');
					that.page = 1;
					that.getOrderList();
				} else {
					uni.showToast({
						title: res.data.msg,
						icon: 'error'
					});
				}
			});
		},
		// 确认发货
		onWuEdit(item) {
			const that = this;
			item = JSON.parse(item);
			if (item.send_type == 2) {
				this.popupContent = '客户是否确认已经收到货？';
			} else {
				this.popupContent = '是否发货？';
			}
			this.data = item;
			this.$refs['shouhuo'].open();
		},
		//确认交货接口请求
		confirmShouhuo() {
			const that = this;
			const item = this.data;
			if (item.send_type == 2 || item.state == 3) {
				this.$request({
					url: 'manage/orderFinish',
					method: 'POST',
					data: {
						id: item.id
					}
				}).then((res) => {
					if (res.data.code == 1) {
						that.$wanlshop.msg('交货成功');
						that.page = 1;
						that.getOrderList();
					} else {
						uni.showToast({
							title: res.data.msg,
							icon: 'error'
						});
					}
				});
			} else {
				uni.setStorageSync('goodsData', {
					...item,
					type: 1,
					flag: 1,
					shop: {
						shopname: that.list[that.index].shopname
					}
				});
				uni.navigateTo({
					url: `/pages/filePages/storeDetails/priceEdit`
				});
			}
			that.$refs['shouhuo'].close();
		},
		// 确认配送
		peisong(item) {
			this.data = JSON.parse(item);
			this.$refs['peisong'].open();
		},
		//配送提交数据
		confirmPeisong() {
			const that = this;
			const item = this.data;
			this.$request({
				url: 'manage/orderSend',
				method: 'POST',
				data: {
					id: item.id
				}
			}).then((res) => {
				const { code, msg } = res.data;
				if (code == 1) {
					that.$wanlshop.msg('操作成功!');
					that.page = 1;
					that.getOrderList();
				} else {
					uni.showToast({
						title: msg,
						icon: 'error'
					});
				}
				that.$refs['peisong'].close();
			});
		},
		handleChe(item) {
			item = JSON.parse(item);
			this.data = {
				id: item.id,
				is_confirm_order: 1
			};
			this.$refs['revoke'].open();
		},
		chexiao(item) {
			this.data = JSON.parse(item);
			this.$refs['weikuanchehui'].open();
		},
		// 尾款撤回操作
		weikuanchehui() {
			const that = this;
			this.$request({
				url: 'manage/orderBack',
				method: 'POST',
				data: {
					id: this.data.id
				}
			}).then((res) => {
				that.$refs['weikuanchehui'].close();
				if (res.data.code == 1) {
					that.$wanlshop.msg(res.data.msg);
					that.page = 1;
					that.getOrderList();
				} else {
					uni.showToast({
						title: res.data.msg,
						icon: 'error'
					});
				}
			});
		},
		wanchengForGoods(item) {
			this.data = JSON.parse(item);
			this.popupContent = '是否确认收到余款？并且已给客户准备好商品？';
			this.$refs.confirmOrder.open();
		},
		//完成订单/确认按钮操作
		confirmOrder() {
			const that = this;
			this.$request({
				url: 'manage/orderSure',
				method: 'POST',
				data: {
					id: this.data.id
				}
			}).then((res) => {
				if (res.data.code == 1) {
					that.popupTitle = '完成订单确认';
					that.$refs['confirmOrder'].close();
					that.$refs['end'].open();
					that.page = 1;
					that.getOrderList();
				} else {
					uni.showToast({
						title: res.data.msg,
						icon: 'error'
					});
				}
			});
		},
		// 婚纱订单完成订单
		wancheng(item) {
			item = JSON.parse(item);
			this.data = item;
			this.popupContent = '是否确认收到余款？并且已给客户安排好档期？';
			this.$refs['confirmOrder'].open();
		},
		// 赠送充值
		zsChongzhi(item) {
			const that = this;
			item = JSON.parse(item);
			if ([0, 4].indexOf(item.zscz_status) == -1) {
				this.$wanlshop.msg('暂不能操作!');
				return;
			}
			this.itemOrderResult = item;
			this.orderResult = item;
			this.$request({
				url: 'manage/get_order_recharge',
				method: 'POST',
				data: {
					id: item.id
				}
			})
				.then((res) => {
					if (res.data.code == 1) {
						const data = res.data.data.groups;
						const recharge_shop = res.data.data.recharge_shop;
						const arr = res.data.data.recharge_shop.map((item) => Number(item.shop_id));
						data.forEach((key, index) => {
							key.id = Number(key.id);
							if (arr.length == 0) {
								if (index == 0) {
									key.chcked = true;
								} else {
									key.chcked = false;
								}
							} else {
								if (arr.indexOf(key.id) != -1) {
									key.chcked = true;
								} else {
									key.chcked = false;
								}
							}
							recharge_shop.forEach((items) => {
								if (key.id == items.shop_id) {
									key.choneMoney = items.money.indexOf('.') != -1 ? items.money : items.money + '.00';
								}
								items.id = items.shop_id;
							});
						});
						that.groupsArr = data;
						if (res.data.data.is_set) {
							that.checkShopList = data.filter((item) => item.chcked);
						} else {
							that.checkShopList = [data[0]];
						}
						that.$refs.chongzhi.open();
					}
				})
				.catch((err) => {
					uni.showToast({
						title: err,
						icon: 'none',
						mask: true
					});
				});
		},
		//选择店铺
		chooseShop(data) {
			this.groupsArr.forEach((item) => {
				if (data.some((id) => id === item.id)) {
					item.chcked = true;
				} else {
					item.chcked = false;
				}
			});
		},
		//节流执行搜索店铺
		//搜索店铺
		searchDP() {
			const _this = this;
			if (this.timer) {
				clearTimeout(this.timer);
			}
			this.timer = setTimeout(() => {
				this.$request({
					url: 'shop/group_shop',
					method: 'GET',
					data: {
						order_id: _this.itemOrderResult.id,
						keywords: _this.searchContent
					}
				}).then((res) => {
					if (res.data.code == 1) {
						_this.chooseShopArr = [];
						res.data.data.forEach((key) => {
							_this.checkShopList.forEach((item) => {
								if (item.id == key.id) {
									key.chcked = true;
									key.choneMoney = item.choneMoney;
									_this.chooseShopArr.push(key.id);
								} else {
									key.chcked = false;
									key.choneMoney = '';
									_this.chooseShopArr = _this.chooseShopArr.filter((val) => val != key.id);
								}
							});
						});
						_this.groupsArr = res.data.data;
					}
				});
				this.timer = null;
			}, 1000);
		},
		//确认选择的店铺
		confirmDP() {
			const arr = JSON.parse(JSON.stringify(this.chooseShopArr));
			let data = JSON.parse(JSON.stringify(this.groupsArr));
			data = data.filter((item) => item.chcked);
			arr.forEach((item) => {
				const n = this.checkShopList.findIndex((val) => val.id == item);
				if (n == -1) {
					this.checkShopList.push(data.find((key) => key.id == item));
				}
			});
			// this.checkShopList = data;
			this.searchContent = '';
			this.$refs.chooseDP.close();
		},
		//店铺金额输入校验
		onInput(index, val) {
			const data = JSON.parse(JSON.stringify(this.checkShopList));
			// 更新数据绑定的值
			data[index].choneMoney = Number(val).toFixed(2).toString();
			this.checkShopList = data;
		},
		//删除店铺
		delShop(id) {
			this.groupsArr.forEach((item) => {
				if (item.id == id) {
					item.chcked = false;
				}
			});
			this.checkShopList = this.checkShopList.filter((item) => item.id != id);
		},
		// 新增推荐人
		handeTuijian(item) {
			item = JSON.parse(item);
			if ([3, 2].indexOf(item.tjr_status) == -1) {
				this.$wanlshop.msg('暂不能操作!');
				return;
			}
			uni.navigateTo({
				url: `./screen?shopId=${this.shopId}&orderId=${item.id}&index=${this.index}&shopType=${this.shopType}&listIndex=${this.listIndex}`
			});
		}
	}
};
</script>

<style scoped lang="scss">
.b {
	padding: 14rpx 30rpx;
	border-radius: 30rpx;
	border: 1rpx solid #ccc;
	font-size: 22rpx;
	color: #333;
	margin-left: 12rpx;
}

.r {
	padding: 14rpx 30rpx;
	border-radius: 30rpx;
	border: 1rpx solid #ff3f4a;
	font-size: 22rpx;
	color: #ff3f4a;
	margin-left: 12rpx;
}
.btny {
	padding: 14rpx 34rpx;
	margin-left: 20rpx;
	font-size: 22rpx;
	color: #ebbe87;
	border: 1rpx solid #ebbe87;
	border-radius: 30rpx;
}
.completeAfter {
	font-size: 26rpx;
	color: #ff3f4a;
}

.completeBefore {
	font-size: 26rpx;
	color: #666;
}

.flex {
	display: flex;
}

.flex-clom {
	flex-direction: column;
}

.align-center {
	align-items: center;
}

.justify-center {
	justify-content: center;
}

.justify-between {
	justify-content: space-between;
}

.justify-evenly {
	justify-content: space-evenly;
}

.nav-item {
	font-size: 26rpx;
	color: #999999;
	position: relative;
}

.nav-itemClick {
	font-size: 26rpx;
	font-weight: 500;
	color: #333333;
	position: relative;
}

.order_management {
	padding-bottom: 50upx;

	.tab_nav {
		background-color: #ffffff;
	}

	.header_share {
		height: 94upx;
		background: #ffffff;
		overflow: hidden;
		.search-warp {
			position: relative;
			z-index: 1;
			padding: 12rpx 32rpx;
		}
		.uni_ipt {
			width: 460upx;
			height: 68upx;
			background: #f3f3f3;
			border-radius: 34upx;
			padding-left: 78upx;
		}

		.search_img {
			width: 40rpx;
			height: 40rpx;
			position: absolute;
			left: 50rpx;
			top: 28rpx;
		}

		.search_btn {
			position: absolute;
			right: 32rpx;
			top: 12rpx;
			width: 116upx;
			height: 68upx;
			background: #e0a76d;
			border-radius: 34upx;
			line-height: 68upx;
			color: #fff;
			z-index: 23;
		}
		.filter {
			display: flex;
			justify-content: center;
			align-items: center;
			.rqsxicon {
				width: 24rpx;
				height: 24rpx;
			}
			.arrow {
				width: 24rpx;
				height: 24rpx;
				transition: all 300ms;
			}
			.showv {
				transform: rotate(180deg);
			}
			.title {
				padding: 0 8rpx;
				font-size: 26rpx;
			}
		}
	}

	.head_riqi_box {
		height: 94upx;
		background: #ffffff;

		/deep/ .uni-date {
			width: 290upx;
			height: 50upx;
			background: #f3f3f3;
			border-radius: 58upx 58upx 58upx 58upx;
		}

		/deep/ .uni-date-x--border {
			border: none !important;
		}

		/deep/ .uni-date-x {
			margin-top: 6upx;
		}

		.zhi_txt {
			color: #999999;
			line-height: 94upx;
		}

		.shaixuan_btn {
			width: 104upx;
			height: 50upx;
			background: #666666;
			border-radius: 25upx 25upx 25upx 25upx;
			line-height: 50upx;
			color: #ffffff;
			margin-top: 18upx;
			margin-left: 6upx;
		}
	}
	.date {
		height: 80rpx;
		line-height: 80rpx;
		margin-top: 20rpx;
		padding: 0 32rpx;
		border-bottom: 2rpx solid #f4f4f4;
		background-color: #fff;
		font-size: 32rpx;
		font-weight: 500;
	}
	.list_box {
		width: 100%;
		background: #fff;
		padding: 32upx 32upx 20upx;
		border-bottom: 2rpx solid #f4f4f4;
		box-sizing: border-box;
		.state_txt {
			color: #444;
		}

		.state_zhifu {
			color: #ff3f4a;
		}

		.xdr_phone_box {
			width: 642upx;
			height: 36upx;
			background: #f4f5f9;
			border-radius: 8upx 8upx 8upx 8upx;
			padding: 12upx 22upx 12upx 22upx;
			margin-top: 24upx;
			align-items: center;

			.xdr_txt {
				color: #999999;
			}

			.phone_txt {
				color: #999999;
			}
		}

		.goods_img_name_money {
			margin-top: 40upx;

			.goods_img {
				width: 116upx;
				height: 116upx;
				border-radius: 8upx;
				overflow: hidden;
			}

			.goods_name {
				width: 356rpx;
				height: 90rpx;
				color: #333333;
				margin-left: 26rpx;
				margin-top: 22rpx;
				line-height: 45rpx;
				display: -webkit-box;
				overflow: hidden;
				white-space: normal;
				text-overflow: ellipsis;
				word-wrap: break-word;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
			}

			.goods_money_box {
				margin-top: 18upx;
				margin-left: 110upx;

				.goods_money_top {
					color: #000000;
				}

				.goods_num {
					color: #666666;
					margin-top: 10upx;
				}
			}
		}

		.edit_state_box {
			margin-top: 18upx;
			right: 0;
			padding-bottom: 20upx;
			display: flex;
			justify-content: flex-end;
			align-items: center;

			.edit_money {
				width: 157upx;
				height: 58upx;
				border-radius: 30upx 30upx 30upx 30upx;
				line-height: 58upx;
				border: 1upx solid #cccccc;
				margin-right: 18upx;
			}
		}
	}
}

.tab_box {
	width: 100%;
	padding: 24upx 16upx;
	background-color: #fff;
	position: sticky;
	top: 0;
	box-sizing: border-box;

	.scroll-view_H {
		white-space: nowrap;

		.listTxt {
			font-size: 28upx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #666;
			display: inline-block;
			margin-right: 46upx;
		}

		.listTxtActive {
			font-size: 32upx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333;
			display: inline-block;
			margin-right: 46upx;
		}
	}
}
.goods_list_box {
	padding: 28rpx 0rpx 32rpx 0rpx;
	background: #fff;
	margin-bottom: 20rpx;
	.flexjus {
		margin-bottom: 10rpx;
		font-size: 30rpx;
	}
	.order_name {
		margin-left: 32rpx;
		margin-right: 32rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.order-title {
		font-size: 26rpx;
		font-weight: 700;
		color: #000;
	}
	.center {
		margin-left: 32rpx;
		margin-right: 32rpx;
		margin-top: 24rpx;
		display: flex;
		align-items: center;
	}
	.pic {
		font-size: 0;
		margin-right: 26rpx;
		image {
			width: 116rpx;
			height: 116rpx;
			border-radius: 8rpx;
		}
	}
	.goods_name {
		flex: 1;
		overflow: hidden;
		display: -webkit-box;
		text-overflow: ellipsis;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		line-height: 45rpx;
		font-size: 26rpx;
		color: #333;
	}
	.money {
		margin-left: 30rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: flex-end;
	}
	.price {
		font-size: 24rpx;
		color: #000;
		font-weight: 700;
	}
	.num {
		font-size: 22rpx;
		color: #666;
		margin-top: 10rpx;
	}
	.option {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		padding-right: 32rpx;
		padding-top: 20rpx;
	}
	.btn {
		margin-left: 12rpx;
		padding: 14rpx 34rpx;
		font-size: 22rpx;
		color: #333;
		border: 1rpx solid #ccc;
		border-radius: 30rpx;
	}
	.time {
		padding-top: 20rpx;
		padding-right: 32rpx;
		font-size: 22rpx;
		color: #999;
		text-align: right;
	}
}
input::placeholder {
	font-family: PingFangSC, PingFang SC;
	font-weight: 400;
	font-size: 28rpx;
	color: #c3c3c3;
}
.shopTitle {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	height: 40rpx;
	margin-bottom: 20rpx;
	font-family: PingFangSC, PingFang SC;
	font-size: 24rpx;
	color: #333;
	line-height: 40rpx;
}
.shopNameWarp {
	display: flex;
	justify-content: center;
	align-items: center;
}
.shopNameFont {
	display: inline-block;
	position: relative;
	height: 40rpx;
	line-height: 40rpx;
	text-align: center;
	padding-left: 48rpx;
	font-size: 24rpx;
	color: #999;
	z-index: 1;
	&:before {
		position: absolute;
		left: 0;
		top: 0;
		content: '';
		width: 40rpx;
		height: 40rpx;
		z-index: 2;
		background: url(@/static/add.png);
		background-size: 100% 100%;
	}
}
.shopItem {
	text-align: center;
	line-height: 70rpx;
}
.chongzhiPopup {
	width: 556rpx;
	background: linear-gradient(rgba(235, 190, 135, 0.2), rgba(255, 255, 255, 1) 100%), #fff;
	border-radius: 32rpx;
	display: flex;
	flex-direction: column;
	padding: 20rpx 0;
	position: relative;
	.title {
		text-align: center;
		font-size: 32rpx;
		color: #333;
		font-weight: 600;
		margin-top: 25rpx;
	}
	.content {
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 24rpx;
		color: #333333;
		line-height: 40rpx;
		text-align: justify;
		padding-bottom: 30rpx;
	}
	.inputWarp {
		border-radius: 48rpx;
		width: 100%;
		margin-bottom: 32rpx;
		border: 1px solid #cdcdcd;
		box-sizing: border-box;
	}
	.submitBtn {
		border-radius: 48rpx;
		height: 68rpx;
		width: 100%;
		color: #fff;
		text-align: center;
		line-height: 68rpx;
		font-size: 28rpx;
		margin-top: 40rpx;
		background: rgba(235, 190, 135, 1);
	}
}
.popup-container {
	padding: 40rpx;
	background: linear-gradient(to bottom, rgba(235, 190, 135, 0.4) 0%, #fff 100%);
	border-radius: 20rpx;
	.title {
		padding: 10rpx 0 60rpx;
		font-size: 32rpx;
		text-align: center;
		box-sizing: border-box;
	}
}
.dialog-container {
	width: 600rpx;
	padding: 32rpx;
	background: #fff;
	border-radius: 32rpx;
	box-sizing: border-box;
	.title {
		padding-top: 12rpx;
		font-size: 36rpx;
		font-weight: bold;
		text-align: center;
		line-height: 50rpx;
	}
	.content {
		padding: 32rpx;
		text-align: center;
		font-size: 30rpx;
		color: #666;
		line-height: 42rpx;
	}
	.btn-group {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-top: 32rpx;
		.btn:only-child {
			width: 100%;
		}
	}
	.btn {
		width: 260rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-size: 30rpx;
		text-align: center;
		border-radius: 10rpx;
	}
	.confirm {
		background: #ebbe87;
		color: #fff;
	}
	.cancel {
		background: #f3f3f3;
		color: #333;
	}
}
.filter-box {
	position: absolute;
	left: 0;
	top: 94rpx;
	width: 100%;
	height: calc(100% - 94rpx);
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 200;
	.filter-container {
		width: 100%;
		background-color: #fff;
	}
	.fillter-warp {
		padding: 32rpx;
		.title {
			height: 32rpx;
			padding-bottom: 30rpx;
			font-size: 26rpx;
		}
		.date_box {
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.divider {
				width: 64rpx;
				height: 2rpx;
				margin: 0 28rpx;
				background-color: #666;
			}
		}
	}
	.btn-group {
		display: flex;
		.btn {
			width: 50%;
			height: 88rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 28rpx;
		}
		.reset {
			background-color: rgba(235, 190, 135, 0.3);
			color: #d09f65;
		}
		.confirm {
			background: linear-gradient(to right, #e4b77f 0%, #cd9c61 100%);
			color: #fff;
		}
	}
}
</style>
<style>
page {
	background-color: #f4f5f9;
}
</style>
